hook::add muc_available muchooks
proc muchooks {from args} {
	puts ================
	puts "from $from\ntype"
	puts $args
	puts ================
	global mucinfo
	if {[info exists mucinfo(af,$from)]} {
		if {$mucinfo(af,$from)=="owner"} {
			puts _________________owner
			eval {hook::run mucavailableowner $from} $args
		} elseif {$mucinfo(af,$from)=="administrator"} {
			puts _________________administrator
			eval {hook::run mucavailableadministrator $from} $args
		} elseif {$mucinfo(af,$from)=="member"} {
			puts _________________member
			eval {hook::run mucavailablemember $from} $args
		} elseif {$mucinfo(af,$from)=="none"} {
			puts _________________none
			eval {hook::run mucavailablenone $from} $args
		}
	}
	if {[info exists mucinfo(role,$from)]} {
		if {$mucinfo(role,$from)=="administrator"} {
			puts ===================admin
			eval {hook::run mucavailableroleadministrator $from} $args
		} elseif {$mucinfo(role,$from)=="moderator"} {
			puts ===================moder
			eval {hook::run mucavailablemoderator $from} $args
		} elseif {$mucinfo(role,$from)=="participant"} {
			puts ===================part
			eval {hook::run mucavailableparticipant $from} $args
		} elseif {$mucinfo(role,$from)=="visitor"} {
			puts ===================visitor
			eval {hook::run mucavailablevisitor $from} $args
		}
	}
	if {([info exists mucinfo(af,$from)]) && ([info exists mucinfo(role,$from)])} {
		if {($mucinfo(af,$from)=="none") && ($mucinfo(role,$from)=="participant")} {
			puts _________________newmucuser
			eval {hook::run newmucuser $from} $args
		}
	}
}